/* $Id: WidgetConfiguration.java 52 2010-01-11 01:42:30Z aaron.day $ */
package org.crazydays.gameplan.widget;


import java.util.LinkedList;
import java.util.List;
import java.util.Properties;

import org.crazydays.gameplan.db.Database;

/**
 * WidgetConfiguration
 */
public class WidgetConfiguration
{
    /** properties */
    protected List<Properties> properties = new LinkedList<Properties>();

    /** databases */
    protected List<Database> databases = new LinkedList<Database>();

    /**
     * WidgetConfiguration constructor.
     */
    public WidgetConfiguration()
    {
    }

    /**
     * Add database.
     * 
     * @param database Database
     */
    public void addDatabase(Database database)
    {
        if (database == null) {
            throw new IllegalArgumentException("database == null");
        }

        databases.add(database);
    }

    /**
     * Get properties.
     * 
     * @param properties Properties
     */
    public void addProperties(Properties properties)
    {
        if (properties == null) {
            throw new IllegalArgumentException("properties == null");
        }

        this.properties.add(properties);
    }

    /**
     * Get databases.
     * 
     * @return Databases
     */
    protected List<Database> getDatabases()
    {
        return databases;
    }

    /**
     * Get properties.
     * 
     * @return Properties
     */
    protected List<Properties> getProperties()
    {
        return properties;
    }
}
